package com.pkk.cloud.support.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.pkk.cloud.support.admin.bo.OauthServerClientBo;
import com.pkk.cloud.support.admin.dto.req.resources.OauthClientRoleResourcesReqDto;
import com.pkk.cloud.support.admin.dto.req.server.OauthServerIdReqDto;
import com.pkk.cloud.support.admin.dto.req.server.OauthServerPageSearchReqDto;
import com.pkk.cloud.support.admin.dto.resp.client.OauthClientServerSimpleRespDto;
import com.pkk.cloud.support.admin.dto.resp.server.OauthServerClientSimpleRespDto;
import com.pkk.cloud.support.admin.dto.resp.server.OauthServerListRespDto;
import com.pkk.cloud.support.admin.dto.resp.server.RoleClientResourceSimpeRespDto;
import com.pkk.cloud.support.admin.entity.resource.PenguinSysServer;
import java.util.List;

public interface PenguinSysServerService extends IService<PenguinSysServer> {


  /**
   * @Description: 保存服务(客户端组)
   * @Param: server
   * @return: boolean
   * @Author: peikunkun
   * @Date: 2020/4/1 0001 下午 9:25
   */
  boolean saveSysServerService(PenguinSysServer server);

  /**
   * @Description: 删除服务(客户端组)
   * @Param: id
   * @return: boolean
   * @Author: peikunkun
   * @Date: 2020/4/1 0001 下午 9:36
   */
  boolean delSysServerServiceById(Long[] id);

  /**
   * @Description: 更新id依据服务信息
   * @Param: server
   * @return: boolean
   * @Author: peikunkun
   * @Date: 2020/4/1 0001 下午 9:40
   */
  boolean updateSysServerServiceById(PenguinSysServer server);


  /**
   * @Description: 返回服务信息(客户端组)的列表
   * @Param: body
   * @Author: peikunkun
   * @Date: 2020/4/1 0001 下午 9:45
   */
  List<OauthServerListRespDto> findSysServerServiceList(OauthServerPageSearchReqDto reqDto);

  /**
   * @Description: 依据服务端组id查询服务(客户端)信息
   * @Param: body
   * @return: java.util.List<com.pkk.cloud.support.admin.dto.resp.client.OauthClientServerSimpleRespDto>
   * @Author: peikunkun
   * @Date: 2020/4/5 0005 上午 12:30
   */
  List<OauthClientServerSimpleRespDto> getServerByServerGroupId(OauthServerIdReqDto body);

  /**
   * @Description: 获取服务客户端的信息
   * @return: java.util.List<com.pkk.cloud.support.admin.dto.resp.server.OauthServerClientSimpleRespDto>
   * @Author: peikunkun
   * @Date: 2020/4/9 下午7:13
   */
  List<OauthServerClientSimpleRespDto> getServerClient();

  /**
   * @Description: 获取角色与资源的的绑定关系树
   * @Param: body
   * @return: java.util.List<com.pkk.cloud.support.admin.dto.resp.server.RoleClientResourceSimpeRespDto>
   * @Author: peikunkun
   * @Date: 2020/4/9 下午9:57
   */
  List<RoleClientResourceSimpeRespDto> getRoleClientResource(OauthClientRoleResourcesReqDto body);


  /**
   * @Description: 获取所有的角色与资源的关系树
   * @Param: body
   * @return: java.util.List<com.pkk.cloud.support.admin.dto.resp.server.RoleClientResourceSimpeRespDto>
   * @Author: peikunkun
   * @Date: 2020/4/9 下午9:57
   */
  List<OauthServerClientSimpleRespDto> getClientResource(String clientId);


  /**
   * @Description: 获取转换之后的服务端信息
   * @Author: peikunkun
   * @Date: 2020/4/9 下午8:13
   */
  List<OauthServerClientBo> findSysServerClientConvert();
}
